package org.testis.testdriver;

import org.testis.testdriver.AtofEnumaration.AtofLogLevel;
import org.testis.testdriver.exceptions.TestAbortException;
import org.testis.testdriver.validation.CriticalPostCaseException;


/**
 * A concrete Visitee class that is used to execute the Visitor TestPart class in
 * Debugger mode
 * 
 * @author barisergun
 */
public class Debugger extends ExecutionInterface
{

    public Debugger(TestPart testPart)
    {
        mTestPart = testPart;
    }


    public void execute() throws InterruptedException
    {

        NotificationSubjectSingleton.getInstance().notifyLogMessages(
                                            this.getClass().getName(),
                                           AtofLogLevel.INFO,
                                           "Debugging Mode :" +
                                           AtofEnumaration.DebuggingMode.Debugging,
                                           mTestPart.getPartGuid());

        boolean testSuiteResult = false;
        try {
            testSuiteResult = mTestPart.run(
                AtofEnumaration.DebuggingMode.Debugging);
        } catch (CriticalPostCaseException eee) {
        } catch (TestAbortException eee) {
        }


    }
}

